

#ifndef COMPANYDAO_INTERFACE_H
#define COMPANYDAO_INTERFACE_H

#include <stdint.h>
#include <string>
#include "app_platform/cntl_info.h"

#include <set>	
#include "erp/company/ddo/companyinfoddo_company.h"	
#include <map>	
#include "erp/company/ddo/companyfilterddo_company.h"	
#include <vector>	


namespace erp
{
namespace company
{
namespace dao
{

	/// 同步调用接口
	class ICompanyDao	{
	public:
		virtual ~ICompanyDao() {}

	public:

		/**
		 *
	 	 *  写入&更新用户企业信息 
		 *
		 *@param String machineKey: 机器码，必填  				
		 *@param String source: 调用来源，必填  				
		 *@param uint32_t sceneId: 场景id，必填  				
		 *@param CompanyInfoDdo companyInfo: 员工信息列表，必填  				
		 *@param String inReserve: 请求保留字  				
		 *@param String errmsg: 错误信息  		
		 *@param String outReserve: 返回保留字   		
		 *
		 *@return  uint32_t : 0(成功) 其它失败
 	     *
		 */
	    virtual uint32_t AddAndUpdateCompany(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				const erp::company::ddo::CCompanyInfoDdo& companyInfo,
				const std::string& inReserve,
				std::string& errmsg,
				std::string& outReserve
	    	) = 0;

		/**
		 *
	 	 *  逻辑删除用户企业信息 
		 *
		 *@param String machineKey: 机器码，必填  				
		 *@param String source: 调用来源，必填  				
		 *@param uint32_t sceneId: 场景id，必填  				
		 *@param CompanyInfoDdo companyInfo: 用户企业信息列表，必填  				
		 *@param String inReserve: 请求保留字  				
		 *@param String errmsg: 错误信息  		
		 *@param String outReserve: 返回保留字   		
		 *
		 *@return  uint32_t : 0(成功) 其它失败
 	     *
		 */
	    virtual uint32_t DeleteCompany(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				const erp::company::ddo::CCompanyInfoDdo& companyInfo,
				const std::string& inReserve,
				std::string& errmsg,
				std::string& outReserve
	    	) = 0;

		/**
		 *
	 	 *  获取银行账户信息 
		 *
		 *@param String machineKey: 机器码，必填  				
		 *@param String source: 调用来源，必填  				
		 *@param uint32_t sceneId: 场景id，必填  				
		 *@param CompanyFilterDdo companyFilter: 过滤器，必填  				
		 *@param String inReserve: 请求保留字  				
		 *@param String errmsg: 错误信息  		
		 *@param Vector companyInfo: 员工信息  		
		 *@param String outReserve: 返回保留字   		
		 *
		 *@return  uint32_t : 0(成功) 其它失败
 	     *
		 */
	    virtual uint32_t GetCompany(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				const erp::company::ddo::CCompanyFilterDdo& companyFilter,
				const std::string& inReserve,
				std::string& errmsg,
				std::vector<erp::company::ddo::CCompanyInfoDdo >& companyInfo,
				std::string& outReserve
	    	) = 0;

		/**
		 *
	 	 *  通过SysNos获取用户企业信息 
		 *
		 *@param String machineKey: 机器码，必填  				
		 *@param String source: 调用来源，必填  				
		 *@param uint32_t sceneId: 场景id，必填  				
		 *@param Set companysysNoList: 用户企业SysNo数组，必填  				
		 *@param String inReserve: 请求保留字  				
		 *@param String errmsg: 错误信息  		
		 *@param Map companyInfo: 员工信息  		
		 *@param String outReserve: 返回保留字   		
		 *
		 *@return  uint32_t : 0(成功) 其它失败
 	     *
		 */
	    virtual uint32_t GetCompanyByIds(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				const std::set<uint32_t >& companysysNoList,
				const std::string& inReserve,
				std::string& errmsg,
				std::map<uint32_t,erp::company::ddo::CCompanyInfoDdo >& companyInfo,
				std::string& outReserve
	    	) = 0;
	};

	///异步调用接口
	class ICompanyDaoAsyc
	{
	public:
		virtual ~ICompanyDaoAsyc() {}
	public:
		virtual uint32_t SendAddAndUpdateCompany(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				const erp::company::ddo::CCompanyInfoDdo& companyInfo,
				const std::string& inReserve
				) = 0;
		virtual uint32_t RecvAddAndUpdateCompany(
				const CCntlInfo& rCntlInfo,

				std::string& errmsg,
				std::string& outReserve
				) = 0;
		virtual uint32_t SendDeleteCompany(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				const erp::company::ddo::CCompanyInfoDdo& companyInfo,
				const std::string& inReserve
				) = 0;
		virtual uint32_t RecvDeleteCompany(
				const CCntlInfo& rCntlInfo,

				std::string& errmsg,
				std::string& outReserve
				) = 0;
		virtual uint32_t SendGetCompany(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				const erp::company::ddo::CCompanyFilterDdo& companyFilter,
				const std::string& inReserve
				) = 0;
		virtual uint32_t RecvGetCompany(
				const CCntlInfo& rCntlInfo,

				std::string& errmsg,
				std::vector<erp::company::ddo::CCompanyInfoDdo >& companyInfo,
				std::string& outReserve
				) = 0;
		virtual uint32_t SendGetCompanyByIds(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				const std::set<uint32_t >& companysysNoList,
				const std::string& inReserve
				) = 0;
		virtual uint32_t RecvGetCompanyByIds(
				const CCntlInfo& rCntlInfo,

				std::string& errmsg,
				std::map<uint32_t,erp::company::ddo::CCompanyInfoDdo >& companyInfo,
				std::string& outReserve
				) = 0;
	};
	
	
}
}
}

#endif /*COMPANYDAO_INTERFACE_H*/
